# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Aaron Schaefer <aaron@elasticdog.com>

pkgname=pv
pkgver=1.8.0
pkgrel=1
pkgdesc='A terminal-based tool for monitoring the progress of data through a pipeline'
arch=(loong64 x86_64)
url="https://www.ivarch.com/programs/$pkgname.shtml"
# _url="https://codeberg.org/a-j-wood/$pkgname"
# _url="https://github.com/a-j-wood/$pkgname"
license=('custom:Artistic 2.0')
depends=(glibc)
_archive="$pkgname-$pkgver"
source=("${url%/*}/sources/$_archive.tar.gz"
        "$_archive.tar.gz.sig::${url%/*}/sources/$_archive.tar.gz.txt")
# source=("$_url/releases/download/v$pkgver/$_archive.tar.gz")
sha256sums=('5cec4f737826a0eddab471dd3b75a587bd29a2e7cfa30068d57f29439a251fdf'
            'SKIP')
validpgpkeys=(2189D5C29F041F2277AFD50AC1596BA33FC56F51  # andrew.wood@ivarch.com
              4267B4F90F2678A112169BD61D1EF7581B45E9A0) # https://codeberg.org/a-j-wood.gpg

build() {
	cd "$_archive"
	./configure --prefix=/usr
	make
}

package() {
	cd "$_archive"
	make DESTDIR="$pkgdir" install
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" docs/COPYING
}
